<?php

class TranslationController extends Controller
{
	public function actionIndex()
	{
		$this->pageTitle = AdminModule::t('Translations');

		Yii::app()->menu->set('breadcrumbs', array(
			UserModule::t('Admin') => $this->module->urls['base'],
			$this->pageTitle
		));
		
		$dataProviderSources = new CActiveDataProvider('MessageSource', array(
			'criteria' => array(
				'order' => 'category ASC, id ASC',
				'with'  => array('translationsCount'),
			),
			'pagination' => array(
				'pageSize' => 20,
			),
		));
		
		$model = MessageSource::model()->findByAttributes(array('category' => 'core', 'message' => 'Home'));
		
		
		
		$this->render('index', array(
			'model'   => $model,
			'sources' => $dataProviderSources,
		));
	}
	
}